package demo.day10;

/**
 * @Auther: hjy(lc))
 * @Date: 2022/8/1-08-01-16:18
 * @Description：demo.day10
 */
public class Cat extends Animal{
    public Cat(int legs) {
        super(legs);
    }

    @Override
    public void walk() {
        System.out.println("猫用" + super.getLegs() + "条腿走路");
    }

    @Override
    public void eat() {
        System.out.println("猫咪正在吃饭");
    }

    public static void main(String[] args) {
        Cat cat = new Cat(4);
        cat.eat();
        cat.walk();
    }
}
